import service from '../utils/request';

export const validate = () => {
    return service.get('/user/validate');
}

export const login = (data) => {
    return service.post('/user/login', data);
}

export const getInfo = () => {
    return service.get('/user/info');
}

export const register = (data) => {
    return service.post('/user/register', data);
}

export const updatePass = (data) => {
    return service.put('/user/password', data);
}

export const logout = () => {
    return service.post('/user/logout');
}
export const getMenu = () => {
    return service.get('/user/menu');
}
export const getUserExamList = (param) => {
    return service.get('/user/exam/list', { params: param });
}

export const getExamUserList = (param) => {
    return service.get('/user/exam/user/list', { params: param });
}

export const getUserBookList = (param) => {
    return service.get('/user/book/list', { params: param });
}

export const deleteUserBook = (id) => {
    return service.delete(`/user/book/delete/${id}`);
}
